home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / apport / testsuite / run-tests next >
Encoding:
Text File  |  2009-04-06  |  1.2 KB  |  51 lines

  1. #!/bin/sh -e
  2.  
  3. if [ "$1" = local ]; then
  4.     export PYTHONPATH=.
  5.     export APPORT_CRASHDB_CONF=./etc/apport/crashdb.conf
  6.     basedir=.
  7.     local=1
  8.  
  9.     if [ ! -e apport/packaging_impl.py ]; then
  10.     echo "You need to copy an appropriate packaging implementation from backends/ to apport/packaging_impl.py" >&2
  11.     exit 1
  12.     fi
  13. else
  14.     basedir="/usr/lib/python2.5/site-packages"
  15.     unset local
  16. fi
  17.  
  18. mydir=`dirname "$0"`
  19.  
  20. set -x
  21. python -tt $basedir/problem_report.py -v
  22. python -tt $basedir/apport/fileutils.py -v
  23. python -tt $basedir/apport/report.py -v
  24. python -tt $basedir/apport_python_hook.py -v
  25. python -tt $basedir/apport/ui.py -v
  26. python -tt $basedir/apport/REThread.py -v
  27. python -tt $basedir/apport/chroot.py -v
  28. python -tt $basedir/apport/crashdb_impl/memory.py -v
  29. python -tt $basedir/apport/packaging_impl.py -v
  30.  
  31. if [ "$local" ]; then
  32.     $mydir/test-hooks -l
  33. else
  34.     $mydir/test-hooks
  35. fi
  36.  
  37. if [ "$local" ]; then
  38.     $mydir/test-crash-digger
  39. fi
  40.  
  41. if [ "`dd if=/proc/sys/kernel/core_pattern count=1 bs=1 2>/dev/null`" = "|" ]; then
  42.     $mydir/test-apport kernel
  43. else
  44.     if [ "$local" ]; then
  45.         $mydir/test-apport lib
  46.     else
  47.         echo 'apport is not enabled; run "sudo /etc/init.d/apport start" to do so' >&2
  48.         exit 1
  49.     fi
  50. fi
  51.